# Contributor: Julian Weigt <juw@posteo.de>
# Contributor: Maxim Karasev <mxkrsv@disroot.org>
# Maintainer: Julian Weigt <juw@posteo.de>
pkgname=gomuks
pkgver=0.3.0
pkgrel=10
pkgdesc="terminal-based Matrix client written in Go"
url="https://github.com/tulir/gomuks"
arch="all"
license="AGPL-3.0-or-later"
depends="ncurses"
makedepends="go olm-dev sqlite-dev"
subpackages="$pkgname-doc"
options="!check" # no test suite
source="$pkgname-$pkgver.tar.gz::https://github.com/tulir/gomuks/archive/v$pkgver.tar.gz"

export GOFLAGS="$GOFLAGS -tags=libsqlite3"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build
}

package() {
	install -Dm755 gomuks "$pkgdir/usr/bin/gomuks"
	install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
}

sha512sums="
9f001db7b926779f4f33dd0fa3c5d4a88ec31862ecbcfd529846b187d3ac26f70d2836250bc827a8852b8af62a32a3e2e20861f849cfa2d39bf1784967c4c80a  gomuks-0.3.0.tar.gz
"
